package com.app;

import com.app.utils.MinIOUtils;
import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Data
public class MinIOConfig {

    //@Value("${minio.endpoint}")
    private String endpoint = "http://192.168.157.129:9000";
    //@Value("${minio.fileHost}")
    private String fileHost = "http://192.168.157.129:9000";
    //@Value("${minio.bucketName}")
    private String bucketName = "imooc";
    //@Value("${minio.accessKey}")
    private String accessKey = "minioadmin";
    //@Value("${minio.secretKey}")
    private String secretKey = "minioadmin";
    private Integer imgSize = 1024;
    //@Value("${minio.fileSize}")
    private Integer fileSize = 1024;

    @Bean
    public MinIOUtils creatMinioClient() {
        return new MinIOUtils(endpoint, bucketName, accessKey, secretKey,imgSize,fileSize);
    }
}
